<div class="weui-tabbar" id="tabbar252825">
    <a href="index.html" page="index" class="weui-tabbar__item  [item1] ">
        <span class="weui-tabbar_color  [item1] ">
            <i class="fa fa-home"
               style="height:40px;width:40px;font-size: 40px">
        </i></span>
        <p class="weui-tabbar__label">首页</p></a>
    <a href="productcenter.html" page="productcenter" class="weui-tabbar__item  [item2] ">
       <span class="weui-tabbar_color  [item2] ">
           <i class="fa fa-photo"
              style="height:36px;width:40px;margin-top:4px;font-size: 32px">
        </i></span>
        <p class="weui-tabbar__label">产品展示</p></a>
    <a href="javascript:editor()" page="newscenter" class="weui-tabbar__item  [item3]">
           <span class="weui-tabbar_color  [item3] ">
               <i class="fa fa-newspaper-o"
                  style="height:36px;width:40px;;margin-top:4px;font-size: 32px">
        </i></span>
        <p class="weui-tabbar__label">发布产品</p></a>
    <a href="about.html" page="about" class="weui-tabbar__item  [item4] ">
          <span class="weui-tabbar_color  [item4] ">
              <i class="fa fa-user-o"
                 style="height:36px;width:40px;;margin-top:4px;font-size: 32px">
        </i></span>
        <p class="weui-tabbar__label">关于我们</p></a>

    <style type="text/css">
        .weui-tabbar__label, .weui-tabbar_color {
            color: #999999;
        }

        .weui-bar__item_on  {
            color: #62b900;
        }
    </style>
</div>

</div>
</body>

<script charset="utf-8" type="text/javascript">

    var item_id = {$id};
    console.log('id: '+item_id);
    var isget = true;
    var container111 = new getTemplate('tmp111');

    function editor() {

        $.ajax({
            url: 'islogin.html',//url
            data: {},
            type: 'GET',// 'POST' or 'GET'
            dataType: 'json',//'json' or 'text' or 'html'
            success: function (data) {
                console.log('islogin: '+data['isLogin']);

                if(!data['isLogin']){
                    $.confirm({
                        title: '您尚未登录',
                        text: '是否登录账号？',
                        onOK: function () {
                            window.location.href='/index/login/login?returnURL='+window.location.href;
                        },
                        onCancel: function () {
                        }
                    });
                }else{
                    window.location.href='editor.html';
                }
            }
        });
    }


    var getData = function () {
        $.ajax({
            url: '[ajax_url]',//url
            data: {id: item_id},
            type: 'POST',// 'POST' or 'GET'
            dataType: 'json',//'json' or 'text' or 'html'

            success: function (data) {

                    container111.setValue(data);
                    container111.append('#content1');

            }
        });
    }


    getData();


</script>

</html>